<template>
	<view>
		<view class="box">
			<u-text :text="`心理健康测试方式`" lineHeight="50px" size="20px" color="#fff"
				align="left"></u-text>
		</view>
		<view>
			<u-list>
				<u-list-item v-for="test in tests" :key="test.id">
					<u-cell :title="test.name">
						<template #right-icon>
							<u-button :text="test.word" type="primary" size="small"
								@click.stop="but(test.id,test.url)"></u-button>
						</template>
					</u-cell>
				</u-list-item>
			</u-list>
		</view>
	</view>
</template>
<!---->
<script>
	export default {
		data() {
			return {
				tests: [{
						name: '图画分析',
						id: 0,
						word:'进入分析',
						url: '/pages/psychologyModel/drawingAnalysis/index'
					},
					{
						name: '面相分析',
						id: 1,
						word:'进入分析',
						url: '/pages/psychologyModel/facialAnalysis/index'
					},
					{
						name: '心理健康测试',
						id: 2,
						word:'进入测试',
						url: '/pages/psychologyModel/psychologicalTest/index'
					},
					{
						name: '语音交流',
						id: 3,
						word:'开始交流',
						url: ''
					}
				],
				title: '心理健康测试'
			};
		},
		methods: {
			but(id, url) {
				console.log(`即将进入测试，测试 ID 为: ${id}`);
				uni.navigateTo({
					url: url,
				});
			}
		}
	};
</script>

<style scoped>
	* {
		margin: 0;
		padding: 0;
	}

	.box {
		height: 50px;
		width: 100%;
		background-color: #02a7f0;
		display: flex;
		align-items: center;
		padding-left: 15px;
	}

	.text-area {
		width: 100%;
		height: 100%;
	}
	/deep/ .u-cell__title-text.data-v-913eaa32{
		font-size: 35rpx !important;
	}
</style>